package com.hl.toolkit.server.tycoin.common.enums;

/**
 * 下载任务类型
 *
 */
public enum DownloadImageTaskSubTypeEnum {
    IMAGE1(1, "海报1"), IMAGE2(2, "海报2");

    int key;
    String value;

    DownloadImageTaskSubTypeEnum(int key, String value) {
        this.key = key;
        this.value = value;
    }

    public int getKey() {
        return key;
    }

    public void setKey(int key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static DownloadImageTaskSubTypeEnum getEnumByKey(int key) {
        for (DownloadImageTaskSubTypeEnum taskTypeEnum : DownloadImageTaskSubTypeEnum.values()) {
            if (key == taskTypeEnum.getKey()) {
                return taskTypeEnum;
            }
        }
        return null;
    }

}
